home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / rfc / rfcxxxx / rfc1236 < prev    next >
Text File  |  1995-07-25  |  12KB  |  395 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                         L. Morales
  8. Request for Comments: 1236                                      P. Hasse
  9.                                                                  USAISEC
  10.                                                                June 1991
  11.  
  12.  
  13.                   IP to X.121 Address Mapping for DDN
  14.  
  15. Status of this Memo
  16.  
  17.    This memo defines a standard way of converting IP addresses to CCITT
  18.    X.121 addresses and is the recommended standard for use on the
  19.    Internet, specifically for the Defense Data Network (DDN).  This memo
  20.    provides information for the Internet community.  It does not specify
  21.    an Internet standard.  Distribution of this memo is unlimited.
  22.  
  23. 1.  Overview
  24.  
  25.    The Defense Communication Agency (DCA) has stated that "DDN specifies
  26.    a standard for mapping Class A addresses to X.121 addresses."
  27.    Additionally DCA has stated that Class B and C IP to X.121 address
  28.    mapping "standards are the responsibility of the administration of
  29.    the Class B or C network in question".  Therefore, there is NO
  30.    defined single standard way of converting Class B and Class C IP
  31.    addresses to X.121 addresses.
  32.  
  33.    This is an important issue because currently there is no way for
  34.    administrators to define IP to X.121 address mapping.  Without a
  35.    single standard, in a multi-vendor network environment, there is no
  36.    assurance that devices using IP and DDN X.25 will communicate with
  37.    each other.
  38.  
  39.    The IP to X.121 address mapping of Class B and Class C IP addresses
  40.    shall be implemented as described below.  This translation method is
  41.    a direct expansion of the algorithm described in the "MIL-STD:  X.25,
  42.    DDN X.25 Host Interface Specification" [1].  The translation method
  43.    described below is TOTALLY independent of IP subnetting and of any
  44.    masking that may be used in support of IP subnetting.
  45.  
  46. 2.  Background
  47.  
  48.    All Internet hosts are assigned a four octet (32 bit) address
  49.    composed of a network field and a local address field also known as
  50.    the REST field [2] (see Figure 1 thru 3).  Two basic forms of
  51.    addresses are provided:  (1) Physical addresses, correspond to the
  52.    node number and DCE port number of the node to which the DTE is
  53.    connected.  (2) Logical addresses, are mapped transparently by DCE
  54.    software into a corresponding physical network address.
  55.  
  56.  
  57.  
  58. Morales & Hasse                                                 [Page 1]
  59.  
  60. RFC 1236          IP to X.121 Address Mapping for DDN          June 1991
  61.  
  62.  
  63.    To provide flexibility, Internet addresses are divided into 3 primary
  64.    classes:  Class A, Class B, and Class C.  These classes allow for a
  65.    large number of small and medium sized networks.  The network
  66.    addresses used within the Internet in Class A, B, and C networks are
  67.    divided between Research, Defense, Government, (Non-Defense) and
  68.    Commercial uses.
  69.  
  70.    As described in the MIL-STD:  X25, an IP address consists of the
  71.    ASCII text string representation of four decimal numbers separated by
  72.    periods, corresponding to the four octets of a thirty-two bit
  73.    Internet address.  The four decimal numbers are referred to in this
  74.    memo as network (n), host (h), logical address (l), and Interface
  75.    Message Processor (IMP) or Packet Switch Node (PSN) (i).  Thus, an
  76.    Internet address maybe represented as "n.h.l.i" (Class A), "n.n.h.i"
  77.    (Class B), or "n.n.n.hi" (Class C), depending on the Internet address
  78.    class.  Each of these four numbers will have either one, two, or
  79.    three decimal digits and will never have a value greater than 255.
  80.    For example, in the Class A IP address "26.9.0.122", n=26 h=9, l=0,
  81.    and i=122.
  82.  
  83.    The different classes of Internet addresses [3] are illustrated
  84.    below:
  85.  
  86.    Class A:
  87.  
  88.    The highest-order bit is set to 0.
  89.    7-bits define the network number.
  90.    24-bits define the local address.
  91.    This allows  up to 126 class A networks.
  92.    Networks 0 and 127 are reserved.
  93.  
  94.  
  95.       |       n       |       h       |       l       |       i       |
  96.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  97.       |0|   NETWORK   |                 Local Address                 |
  98.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  99.              7 Bits                  24 Bits (REST Field)
  100.  
  101.                                    Figure 1
  102.  
  103.    Class B:
  104.  
  105.    The two highest-order bits are set to 1-0.
  106.    14-bits define the network number.
  107.    16-bits define the local address.
  108.    This allows up to 16,384 class B networks.
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Morales & Hasse                                                 [Page 2]
  115.  
  116. RFC 1236          IP to X.121 Address Mapping for DDN          June 1991
  117.  
  118.  
  119.       |        n      |       n       |       h       |       i       |
  120.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  121.       |1 0|           NETWORK         |          Local Address        |
  122.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  123.                       14 Bits                 16 Bits (REST Field)
  124.  
  125.                                    Figure 2
  126.  
  127.    Class C:
  128.  
  129.    The three highest-order bits are set to 1-1-0.
  130.    21-bits define the network number.
  131.    8-bits define the local address.
  132.    This allows up to 2,097,152 class C networks
  133.  
  134.  
  135.       |       n       |       n       |       n       |   h   |   i   |
  136.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  137.       |1 1 0|                 NETWORK                 | Local Address |
  138.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  139.                               21 Bits                8 Bits (REST Field)
  140.  
  141.                                    Figure 3
  142.  
  143.    The fourth type of address, class D, is used as a multicast address.
  144.    The four highest-order bits are set to 1-1-1-0.  Note:  No addresses
  145.    are allowed with the four highest-order bits set to 1-1-1-1.  These
  146.    addresses, called "class E", are reserved.
  147.  
  148.    The "MIL-STD:  X.25" states "All DDN addresses are either twelve or
  149.    fourteen BCD (binary-coded decimal) digits in length.".  The last two
  150.    digits are referred to as the Sub-Address and are not used on the
  151.    DDN.  The Sub-Address is carried across the network without
  152.    modification.  Its presence is optional.  Therefore, a DTE may
  153.    generate EITHER a twelve or fourteen BCD X.121 address, but must
  154.    accept both twelve and fourteen BCD X.121 addresses.
  155.  
  156. 3.  Standard IP to X.121 Address Mapping
  157.  
  158.    This section describes the algorithm that should be used to convert
  159.    IP addresses to X.121 addresses [1].  You will note that "h" is
  160.    always listed as greater than or less than the number 64.  This
  161.    number is used to differentiate between PSN physical and logical host
  162.    port addresses.  Note that at the time of this writing, the DDN does
  163.    not make use of the PSN's logical addressing feature, which allows
  164.    hosts to be addressed independently of their physical point of
  165.    attachment to the network.
  166.  
  167.  
  168.  
  169.  
  170. Morales & Hasse                                                 [Page 3]
  171.  
  172. RFC 1236          IP to X.121 Address Mapping for DDN          June 1991
  173.  
  174.  
  175. 3.1  Derivation of DDN X.25 Addresses
  176.  
  177.    To convert a Class A IP address to a DDN X.25 address:
  178.  
  179. 3.1.1  If the host field (h) is less than 64 (h < 64),
  180.        the address corresponds to the following DDN X.25
  181.        physical address:
  182.  
  183.    ZZZZ F III HH ZZ (SS)
  184.  
  185.    where:
  186.  
  187.    ZZZZ = 0000
  188.  
  189.    F = 0   because the address is a physical address;
  190.  
  191.    III     is a three decimal digit representation of "i",
  192.            right-adjusted and padded with leading zeros if required;
  193.  
  194.    HH      is a two decimal digit representation of h", right-adjusted
  195.            and padded with leading zeros if required;
  196.  
  197.    ZZ = 00 is optional.
  198.  
  199.    (SS)    is an optional Sub-Address field which is ignored in the DDN.
  200.            This field is either left out or filled with zeros.
  201.  
  202.    The address 26.9.0.122 corresponds to the DDN X.25 physical address
  203.    000001220900.
  204.  
  205. 3.1.2.  If the host field (h) is greater than or equal to
  206.         64 (h >= 64), the address corresponds to the following
  207.         DDN X.25 physical address:
  208.  
  209.    ZZZZ F RRRRR ZZ (SS)
  210.  
  211.    where:
  212.  
  213.    ZZZZ = 0000
  214.  
  215.    F = 1   because the address is a logical address;
  216.  
  217.    RRRRR   is a five decimal digit representation of the result "r" of
  218.            the calculation
  219.  
  220.    r = h * 256 + i
  221.  
  222.    (note that the decimal representation of "r" will always require five
  223.  
  224.  
  225.  
  226. Morales & Hasse                                                 [Page 4]
  227.  
  228. RFC 1236          IP to X.121 Address Mapping for DDN          June 1991
  229.  
  230.  
  231.    digits)
  232.  
  233.    ZZ = 00
  234.  
  235.    and
  236.  
  237.    (SS)   is optional.
  238.  
  239.    The address 26.83.0.207 corresponds to the DDN X.25 logical address
  240.    000012145500.
  241.  
  242. 3.2.  For Class B IP addresses the "h" and "i" fields will ALWAYS
  243.       consist of 8 bits each taken from the REST field of the Internet
  244.       address.  The mapping follows the same rules as in 3.1.
  245.  
  246. 3.3.  For Class C IP addresses the "h" and "i" fields will ALWAYS
  247.       consist of 4 bits each taken from the REST field of the Internet
  248.       address.  The mapping follows the same rules as in 3.1.
  249.  
  250. 4. Examples
  251.  
  252.    The following are examples of IP to X.121 address mappings for Class
  253.    A, Class B, and Class C IP addresses.
  254.  
  255. 4.1  Class A
  256.  
  257.    The mapping of X.121 address for Class A networks:
  258.  
  259.           for h < 64
  260.  
  261.           example: 26.29.0.122   format: n.h.l.i
  262.  
  263.                    ZZZZ F III HH ZZ (SS)
  264.    X.121 address = 0000 0 122 29 00  00
  265.  
  266.           for h > or = 64
  267.  
  268.           example: 26.80.0.122   format: n.h.l.i
  269.  
  270.                     ZZZZ F RRRRR ZZ (SS)
  271.    X.121 address =  0000 1 20602 00  00
  272.  
  273.                   where R = H * 256 + I
  274.  
  275. 4.2  Class B
  276.  
  277.    The mapping of X.121 address for Class B networks:
  278.  
  279.  
  280.  
  281.  
  282. Morales & Hasse                                                 [Page 5]
  283.  
  284. RFC 1236          IP to X.121 Address Mapping for DDN          June 1991
  285.  
  286.  
  287.           for h < 64
  288.  
  289.           example: 137.80.1.5     format: n.n.h.i
  290.  
  291.                     ZZZZ F III HH ZZ (SS)
  292.    X.121 address =  0000 0 005 01 00  00
  293.  
  294.           for h > or = 64
  295.  
  296.           example: 137.80.75.2    format: n.n.h.i
  297.  
  298.                     ZZZZ 1 RRRRR ZZ  (SS)
  299.    X.121 address =  0000 1 19202 00  00
  300.  
  301.                   where R = H * 256 + I
  302.  
  303. 4.3  Class C
  304.  
  305.    The mapping of X.121 address for Class C networks:
  306.  
  307.           for h < 64
  308.  
  309.            example: 192.33.50.19  format: n.n.n.hi
  310.  
  311.                              H    I
  312.                       n.n.n.0001 0011
  313.                              1    3
  314.  
  315.               Subnet  1
  316.               Subhost 3
  317.  
  318.                     ZZZZ F III HH ZZ (SS)
  319.    X.121 address =  0000 0 003 01 00  00
  320.  
  321.    NOTE:  The mapping of X.121 address for Class C networks for h > 64
  322.    is not applicable since the "h" field can never exceed 15.
  323.  
  324. 5.  References
  325.  
  326.    [1] MIL-STD:  X.25 "Defense Data Network X.25 Host Interface
  327.        Specification", Defence Communications Agency, BBN Communications
  328.        Corporation, 1983 December, Volume 1 of the "DDN Protocol
  329.        Handbook" (NIC 50004).  Also available online at the DDN NIC as
  330.        NETINFO:X.25.DOC.
  331.  
  332.    [2] MIL-STD:  1777 "Internet Protocol", 1983 August, Volume 1 of the
  333.        "DDN Protocol Handbook" (NIC 50004).
  334.  
  335.  
  336.  
  337.  
  338. Morales & Hasse                                                 [Page 6]
  339.  
  340. RFC 1236          IP to X.121 Address Mapping for DDN          June 1991
  341.  
  342.  
  343.    [3] Kirkpatrick, S., M. Stahl, and M. Recker, "Internet Numbers", RFC
  344.        1166, DDN NIC, July 1990.
  345.  
  346.        (Unless otherwise indicated, copies of federal and military
  347.        specifications, standards, and handbooks are available from the
  348.        Naval Publications and Forms Center, (ATTN:  NPODS), 5801 Tabor
  349.        Avenue, Philadelphia, PA 19120-5099.)
  350.  
  351.  
  352. 6.  Security Considerations
  353.  
  354.    Security issues are not discussed in this memo.
  355.  
  356. 7.  Authors' Addresses
  357.  
  358.    Luis F. Morales, Jr.
  359.    USAISEC
  360.    ASQB-SEP-C
  361.    Ft. Huachuca, AZ 85613-5300
  362.  
  363.    Phone:  (602) 533-2873
  364.  
  365.    EMail:  lmorales@huachuca-emh8.army.mil
  366.  
  367.  
  368.    Phillip R. Hasse
  369.    USAISEC
  370.    ASQB-SEP-C
  371.    Ft. Huachuca, AZ 85613-5300
  372.  
  373.    Phone:  (602) 533-2873
  374.  
  375.    EMail:  phasse@huachuca-emh8.army.mil
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Morales & Hasse                                                 [Page 7]
  395.